# $Id: PKGBUILD 73851 2012-07-16 05:42:32Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=perl-file-mmagic
pkgver=1.29
pkgrel=1
pkgdesc="Guess file type"
arch=(any)
license=('PerlArtistic')
url="http://search.cpan.org/dist/File-MMagic"
depends=('perl')
options=(!emptydirs)
source=("http://search.cpan.org/CPAN/authors/id/K/KN/KNOK/File-MMagic-${pkgver}.tar.gz")
md5sums=('64221fdfe541505b39ea56d0b09ef8a6')

build() {
  cd "${srcdir}/File-MMagic-${pkgver}"

  PERL_MM_USE_DEFAULT=1 perl Makefile.PL
  make
  make install DESTDIR="${pkgdir}"

  # remove perllocal.pod and .packlist
  find "${pkgdir}" -name perllocal.pod -delete
  find "${pkgdir}" -name .packlist -delete
}
